package com.workcell.workdata.im.model.vo;

import com.workcell.workdata.im.entity.GroupMember;

import java.util.Date;

public class GroupMemberVO {

    private Long id;

    private Long groupId;

    private Long uid;

    private Byte type;

    private String name;

    private String alias;

    private Date createTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getGroupId() {
        return groupId;
    }

    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public Byte getType() {
        return type;
    }

    public void setType(Byte type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public static GroupMemberVO of(GroupMember member, String name){
        GroupMemberVO vo = new GroupMemberVO();
        vo.setGroupId(member.getGroupId());
        vo.setType(member.getType());
        vo.setUid(member.getUid());
        vo.setName(name);
        vo.setAlias(member.getAlias());
        vo.setId(member.getId());
        vo.setCreateTime(member.getCreateTime());
        return vo;
    }
}
